<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>基层AI辅助诊断系统 - 医生工作统计</title>
    <!-- 引入Element Plus的样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-plus/dist/index.css">
    <!-- 引入Vue 3 -->
    <script src="https://unpkg.com/vue@3"></script>
    <!-- 引入Element Plus组件库 -->
    <script src="https://unpkg.com/element-plus"></script>
    <!-- 引入中文语言包 -->
    <script src="https://unpkg.com/element-plus/dist/locale/zh-cn.min.js"></script>
    <!-- 引入图表库 -->
    <script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
    <style>
        /* 基础样式 */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
            background: #FFFFFF;
            color: var(--text-primary);
            font-size: 14px;
            line-height: 1.5;
            margin: 0;
        }

        /* 色彩系统 - 基于HIS系统现代极简风设计规范 */
        :root {
            /* 主色调 */
            --primary: #0F6CBD;
            --primary-light: #D0E7FF;
            --primary-dark: #0A4F8D;
            
            /* 辅助色 */
            --success: #0F8A5F;
            --warning: #F59337;
            --error: #D13438;
            --info: #0078D4;
            
            /* 中性色 - 文字 */
            --text-primary: #1A1A1A;
            --text-secondary: #4D4D4D;
            --text-tertiary: #767676;
            --text-disabled: #A6A6A6;
            
            /* 中性色 - 边框与分割线 */
            --border-strong: #CCCCCC;
            --border-normal: #E0E0E0;
            --border-light: #F0F0F0;
            --divider: #F5F5F5;
            
            /* 中性色 - 背景 */
            --bg-primary: #FFFFFF;
            --bg-secondary: #F9F9F9;
            --bg-card: #FFFFFF;
            --bg-disabled: #F5F5F5;
            
            /* 医疗专业色 */
            --medical-critical: #B91C1C;
            --medical-abnormal: #F59E0B;
            --medical-normal: #10B981;
            --medical-pending: #3B82F6;
            --medical-completed: #9CA3AF;
            
            /* 间距系统 */
            --spacing-2: 2px;
            --spacing-4: 4px;
            --spacing-8: 8px;
            --spacing-12: 12px;
            --spacing-16: 16px;
            --spacing-24: 24px;
            --spacing-32: 32px;
            --spacing-40: 40px;
            --spacing-48: 48px;
            
            /* 字体大小 */
            --font-page-title: 20px;
            --font-card-title: 16px;
            --font-table-title: 14px;
            --font-body: 14px;
            --font-table: 13px;
            --font-small: 12px;
            
            /* 行高 */
            --line-height-title: 1.4;
            --line-height-body: 1.5;
            --line-height-table: 1.2;
            --line-height-form: 1.4;
            
            /* 圆角 */
            --radius-small: 2px;
            --radius-medium: 4px;
            
            /* 动画时间 */
            --transition-fast: 150ms;
            --transition-normal: 200ms;
            --transition-slow: 300ms;
            
            /* 导航统一宽度 */
            --nav-item-width: 140px;
        }

        [v-cloak] {
            display: none;
        }

        /* 布局容器 */
        .container {
            width: 100%;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            background-color: var(--bg-secondary);
        }

        /* 顶部导航栏 */
        .header {
            height: 60px;
            background-color: var(--bg-primary);
            border-bottom: 1px solid var(--border-normal);
            display: flex;
            align-items: center;
            padding: 0 var(--spacing-24);
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
            position: relative;
            z-index: 100;
        }

        .header-spacer {
            width: 200px;
            flex-shrink: 0;
        }

        #app-nav {
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            z-index: 10;
            width: calc(100% - 400px); /* 两侧各200px 对称留白 */
            display: flex;
            justify-content: center;
        }
        
        /* Element Plus菜单样式覆盖 */
        .el-menu {
            border: none !important;
            background-color: transparent !important;
        }
        
        .el-menu--horizontal > .el-menu-item,
        .el-menu--horizontal > .el-sub-menu .el-sub-menu__title {
            height: 60px;
            line-height: 60px;
            color: var(--text-secondary);
            font-weight: 500;
            font-size: var(--font-body);
            padding: 0;
            width: var(--nav-item-width);
            text-align: center;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
        }

        .el-sub-menu__icon-arrow { display: none !important; }

        .el-menu--horizontal > .el-sub-menu .el-sub-menu__title::after {
            content: '';
            display: inline-block;
            width: 16px;
            height: 16px;
            margin-left: 8px;
            background-repeat: no-repeat;
            background-position: center;
            background-size: 16px 16px;
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23767676' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        }

        .el-sub-menu:hover > .el-sub-menu__title::after,
        .el-sub-menu.is-active > .el-sub-menu__title::after {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F6CBD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
        }

        .el-sub-menu.is-opened > .el-sub-menu__title::after {
            background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%230F6CBD' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 15 12 9 18 15'/></svg>");
        }
        
        .el-menu--horizontal > .el-menu-item.is-active,
        .el-menu--horizontal > .el-sub-menu.is-active .el-sub-menu__title {
            color: var(--primary) !important;
            border-bottom: 2px solid var(--primary);
            font-weight: 500;
        }
        
        .el-menu--horizontal > .el-menu-item:not(.is-disabled):hover,
        .el-menu--horizontal > .el-menu-item:not(.is-disabled):focus,
        .el-menu--horizontal > .el-sub-menu:not(.is-disabled):hover .el-sub-menu__title {
            color: var(--primary);
            background-color: transparent;
        }
        
        /* 下拉菜单样式覆盖 */
        .el-menu--popup {
            width: var(--nav-item-width) !important;
            min-width: var(--nav-item-width) !important;
            max-width: var(--nav-item-width) !important;
            border-radius: var(--radius-small);
            padding: 4px 0;
            border: 1px solid var(--border-light);
            border-top: 2px solid var(--primary);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
            text-align: center !important;
        }
        
        .el-menu--popup .el-menu-item {
            height: 36px;
            line-height: 36px;
            padding: 0 !important;
            color: var(--text-secondary);
            white-space: nowrap;
            text-align: center;
            width: var(--nav-item-width) !important;
            box-sizing: border-box;
            overflow: hidden;
            text-overflow: ellipsis;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            font-size: var(--font-body);
        }
        
        .el-menu--popup .el-menu-item:hover {
            background-color: var(--bg-secondary);
            color: var(--primary);
        }

        .user-section {
            display: flex;
            align-items: center;
            gap: var(--spacing-16);
            margin-left: auto;
            z-index: 10;
            width: 200px;
            justify-content: flex-end;
            flex-shrink: 0;
            cursor: pointer;
            padding: 8px 12px;
            border-radius: var(--radius-small);
            transition: background-color var(--transition-fast);
            color: var(--text-secondary);
        }

        .user-section:hover {
            background-color: var(--bg-secondary);
        }

        .user-name {
            font-weight: 500;
            font-size: var(--font-body);
            color: var(--text-secondary);
        }

        .user-arrow {
            color: var(--text-tertiary);
            transition: color var(--transition-normal);
        }

        .user-section:hover .user-arrow {
            color: var(--primary);
        }

        /* 用户下拉弹窗 */
        .user-dropdown {
            position: absolute;
            top: 60px; /* 紧贴头部底部 */
            right: var(--spacing-24);
            width: 160px;
            background: var(--bg-primary);
            border: 1px solid var(--border-light);
            border-radius: var(--radius-small);
            box-shadow: 0 4px 12px rgba(0,0,0,0.08);
            display: none;
            z-index: 200;
            overflow: hidden;
        }

        .user-dropdown .item {
            padding: 10px 12px;
            color: var(--text-secondary);
            font-size: var(--font-body);
            cursor: pointer;
            white-space: nowrap;
        }

        .user-dropdown .item:hover {
            background-color: var(--bg-secondary);
            color: var(--primary);
        }

        /* 主要内容区域样式 */
        .main-content {
            padding: 0;
            flex: 1;
            background-color: var(--bg-primary);
            width: 100%;
        }
        
        .content-card {
            width: 100%;
            margin: 0;
            background: var(--bg-primary);
            border: none;
            border-radius: 0;
            box-shadow: none;
            display: flex;
            flex-direction: column;
        }

        /* 页面标题与操作区域样式 */
        .combined-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: var(--spacing-24);
            border-bottom: 1px solid var(--border-light);
            background-color: var(--bg-primary);
        }
        
        .page-title {
            font-size: var(--font-page-title);
            font-weight: 600;
            color: var(--text-primary);
            line-height: var(--line-height-title);
            margin-right: var(--spacing-24);
            white-space: nowrap;
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: var(--spacing-16);
        }

        /* 表单控件样式 */
        .form-control {
            padding: var(--spacing-8) var(--spacing-12);
            border: 1px solid var(--border-normal);
            border-radius: var(--radius-small);
            font-size: var(--font-body);
            color: var(--text-primary);
            transition: border-color var(--transition-normal);
            height: 32px;
        }
        
        .form-control:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 2px rgba(15, 108, 189, 0.2);
        }

        .date-input {
            width: 140px;
        }

        .date-separator {
            color: var(--text-secondary);
            font-size: var(--font-body);
        }

        /* 按钮样式 */
        .btn {
            padding: var(--spacing-8) var(--spacing-16);
            border-radius: var(--radius-small);
            font-size: var(--font-body);
            font-weight: 500;
            cursor: pointer;
            border: none;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            transition: all var(--transition-normal);
            gap: var(--spacing-8);
            height: 32px;
            line-height: 1;
        }
        
        .btn .icon {
            flex-shrink: 0;
        }
        
        .btn-primary {
            background-color: var(--primary);
            color: white;
        }
        
        .btn-primary:hover {
            background-color: var(--primary-dark);
        }
        
        .btn-primary:active {
            background-color: var(--primary-dark);
            transform: translateY(1px);
        }
        
        .btn-default {
            background-color: var(--bg-primary);
            color: var(--text-secondary);
            border: 1px solid var(--border-normal);
        }
        
        .btn-default:hover {
            background-color: var(--bg-secondary);
        }
        
        .btn-default:active {
            background-color: var(--bg-secondary);
            transform: translateY(1px);
        }

        /* 卡片样式 */
        .card {
            background-color: var(--bg-primary);
            border-radius: var(--radius-small);
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
            border: 1px solid var(--border-light);
            margin-bottom: var(--spacing-24);
        }

        .card-header {
            padding: var(--spacing-16);
            border-bottom: 1px solid var(--border-light);
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .card-title {
            font-size: var(--font-card-title);
            font-weight: 600;
            color: var(--text-primary);
        }

        .card-body {
            padding: var(--spacing-16);
        }

        /* 统计卡片样式 */
        .stats-container {
            display: flex;
            gap: var(--spacing-24);
            margin-bottom: var(--spacing-24);
        }

        .stat-card {
            flex: 1;
            padding: var(--spacing-24);
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            border-radius: var(--radius-small);
            background-color: var(--bg-primary);
            border: 1px solid var(--border-light);
        }

        .stat-title {
            font-size: var(--font-body);
            color: var(--text-secondary);
            margin-bottom: var(--spacing-8);
        }

        .stat-value {
            font-size: 28px;
            font-weight: 600;
            color: var(--text-primary);
        }

        /* 图表容器样式 */
        .chart-container {
            width: 100%;
            height: 300px;
            position: relative;
        }

        /* 表格样式 */
        .table-container {
            overflow: auto;
        }

        .data-table {
            width: 100%;
            border-collapse: collapse;
        }
        
        .data-table th {
            background-color: var(--bg-secondary);
            padding: var(--spacing-12) var(--spacing-16);
            text-align: left;
            font-weight: 600;
            color: var(--text-secondary);
            border-bottom: 1px solid var(--border-normal);
            height: 40px;
            font-size: var(--font-table-title);
        }
        
        .data-table td {
            padding: var(--spacing-12) var(--spacing-16);
            border-bottom: 1px solid var(--border-light);
            color: var(--text-secondary);
            height: 40px;
            vertical-align: middle;
            font-size: var(--font-table);
        }
        
        .data-table tr:hover {
            background-color: var(--bg-secondary);
        }
        
        .data-table tr:last-child td {
            border-bottom: none;
        }

        /* 进度条样式 */
        .progress-container {
            margin-bottom: var(--spacing-16);
        }

        .progress-label {
            display: flex;
            justify-content: space-between;
            margin-bottom: var(--spacing-8);
        }

        .progress-title {
            font-size: var(--font-body);
            color: var(--text-secondary);
        }

        .progress-value {
            font-size: var(--font-body);
            color: var(--text-secondary);
        }

        .progress-bar-bg {
            width: 100%;
            height: 8px;
            background-color: var(--bg-secondary);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            border-radius: 4px;
            transition: width 0.3s ease;
        }

        .progress-bar.success {
            background-color: var(--success);
        }

        .progress-bar.warning {
            background-color: var(--warning);
        }

        .progress-bar.error {
            background-color: var(--error);
        }

        /* 布局网格 */
        .grid {
            display: flex;
            gap: var(--spacing-24);
            margin-bottom: var(--spacing-24);
        }

        .grid-col {
            flex: 1;
        }

        /* 响应式样式 */
        @media (max-width: 768px) {
            .header {
                flex-wrap: wrap;
                padding: var(--spacing-12) var(--spacing-16);
                height: auto;
            }
            
            .header-spacer {
                width: 100%;
                justify-content: center;
                margin-bottom: 8px;
            }
            
            .user-section {
                width: 100%;
                justify-content: center;
                order: 3;
                margin-top: 8px;
            }
            
            #app-nav {
                position: relative;
                left: 0;
                transform: none;
                width: 100%;
                order: 3;
                margin-top: var(--spacing-8);
            }
            
            .combined-header {
                flex-direction: column;
                align-items: flex-start;
                gap: var(--spacing-16);
            }
            
            .page-title {
                margin-bottom: var(--spacing-8);
            }
            
            .header-actions {
                width: 100%;
                flex-direction: column;
                gap: var(--spacing-12);
            }
            
            .stats-container {
                flex-direction: column;
                gap: var(--spacing-16);
            }
            
            .grid {
                flex-direction: column;
            }
        }
    </style>
</head>
<body>
    <div id="app" class="container">
        <!-- 顶部导航栏 - 使用Element Plus组件 -->
        <header class="header">
            <div class="header-spacer"></div>
            <div id="app-nav">
                <el-menu 
                    :default-active="activeIndex" 
                    class="el-menu-demo" 
                    mode="horizontal" 
                    @select="handleSelect"
                    :ellipsis="false"
                    :popper-offset="0"
                    popper-class="custom-dropdown">
                    <el-menu-item index="1">开始问诊</el-menu-item>
                    <el-sub-menu index="2" popper-class="custom-dropdown">
                        <template #title>病历管理</template>
                        <el-menu-item index="2-1">病历查询</el-menu-item>
                        <el-menu-item index="2-2">病历模板</el-menu-item>
                        <el-menu-item index="2-3">个人药品</el-menu-item>
                    </el-sub-menu>
                    <el-menu-item index="3">患者管理</el-menu-item>
                    <el-sub-menu index="4" popper-class="custom-dropdown">
                        <template #title>数据统计</template>
                        <el-menu-item index="4-1">诊断统计</el-menu-item>
                        <el-menu-item index="4-2">宏观统计</el-menu-item>
                    </el-sub-menu>
                    <el-menu-item index="5">医学知识</el-menu-item>
                    <el-sub-menu index="6" popper-class="custom-dropdown">
                        <template #title>基础数据</template>
                        <el-menu-item index="6-1">药品管理</el-menu-item>
                    </el-sub-menu>
                    <el-sub-menu index="7" popper-class="custom-dropdown">
                        <template #title>消息通知</template>
                        <el-menu-item index="7-1">通知查看</el-menu-item>
                        <el-menu-item index="7-2">通知发布</el-menu-item>
                    </el-sub-menu>
                    <el-sub-menu index="8" popper-class="custom-dropdown">
                        <template #title>用户管理</template>
                        <el-menu-item index="8-1">用户管理</el-menu-item>
                        <el-menu-item index="8-2">角色管理</el-menu-item>
                    </el-sub-menu>
                </el-menu>
            </div>
            <div class="user-section" id="userSection">
                <span class="user-name">张医生</span>
                <svg class="user-arrow" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                    <polyline points="6 9 12 15 18 9"></polyline>
                </svg>
            </div>
            <div class="user-dropdown" id="userDropdown">
                <div class="item">个人中心</div>
                <div class="item">退出登录</div>
            </div>
        </header>
        <div class="main-content">
            <div class="content-card">
                <!-- 页面标题与日期筛选区域 -->
                <section class="combined-header">
                    <h1 class="page-title">医生工作统计</h1>
                    <div class="header-actions">
                        <span>时间范围:</span>
                        <input id="startDate" class="form-control date-input" type="date" value="2025-09-01">
                        <span class="date-separator">至</span>
                        <input id="endDate" class="form-control date-input" type="date" value="2025-09-30">
                        <button id="filterBtn" class="btn btn-primary">确定</button>
                    </div>
                </section>
                
                <!-- 接诊概览区域 -->
                <section style="padding: var(--spacing-24);">
                    <div class="card">
                        <div class="card-header">
                            <h2 class="card-title">接诊概览</h2>
                        </div>
                        <div class="card-body">
                            <div class="stats-container">
                                <div class="stat-card">
                                    <div class="stat-title">总接诊人次</div>
                                    <div class="stat-value">128</div>
                                </div>
                                <div class="stat-card">
                                    <div class="stat-title">总接诊金额</div>
                                    <div class="stat-value">¥25,680</div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
                
                <!-- 接诊趋势图区域 -->
                <section style="padding: 0 var(--spacing-24) var(--spacing-24);">
                    <div class="card">
                        <div class="card-header">
                            <h2 class="card-title">接诊趋势图</h2>
                        </div>
                        <div class="card-body">
                            <div class="chart-container">
                                <canvas id="trendChart"></canvas>
                            </div>
                        </div>
                    </div>
                </section>
                
                <!-- 数据排行区域 -->
                <section style="padding: 0 var(--spacing-24) var(--spacing-24);">
                    <div class="card">
                        <div class="card-header">
                            <h2 class="card-title">数据排行</h2>
                        </div>
                        <div class="card-body">
                            <div class="grid">
                                <!-- 疾病种类排行 -->
                                <div class="grid-col">
                                    <h3 style="margin-bottom: var(--spacing-16); font-size: var(--font-card-title); color: var(--text-secondary);">疾病种类排行</h3>
                                    <div class="table-container">
                                        <table class="data-table">
                                            <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>疾病名称</th>
                                                    <th>接诊人次</th>
                                                    <th>占比</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td>1</td>
                                                    <td>高血压</td>
                                                    <td>41</td>
                                                    <td>32%</td>
                                                </tr>
                                                <tr>
                                                    <td>2</td>
                                                    <td>糖尿病</td>
                                                    <td>23</td>
                                                    <td>18%</td>
                                                </tr>
                                                <tr>
                                                    <td>3</td>
                                                    <td>感冒</td>
                                                    <td>15</td>
                                                    <td>12%</td>
                                                </tr>
                                                <tr>
                                                    <td>4</td>
                                                    <td>胃炎</td>
                                                    <td>10</td>
                                                    <td>8%</td>
                                                </tr>
                                                <tr>
                                                    <td>5</td>
                                                    <td>颈椎病</td>
                                                    <td>9</td>
                                                    <td>7%</td>
                                                </tr>
                                                <tr>
                                                    <td>6</td>
                                                    <td>腰椎间盘突出</td>
                                                    <td>6</td>
                                                    <td>5%</td>
                                                </tr>
                                                <tr>
                                                    <td>7</td>
                                                    <td>高脂血症</td>
                                                    <td>5</td>
                                                    <td>4%</td>
                                                </tr>
                                                <tr>
                                                    <td>8</td>
                                                    <td>支气管炎</td>
                                                    <td>4</td>
                                                    <td>3%</td>
                                                </tr>
                                                <tr>
                                                    <td>9</td>
                                                    <td>关节炎</td>
                                                    <td>3</td>
                                                    <td>2%</td>
                                                </tr>
                                                <tr>
                                                    <td>10</td>
                                                    <td>失眠</td>
                                                    <td>3</td>
                                                    <td>2%</td>
                                                </tr>
                                                <tr>
                                                    <td>-</td>
                                                    <td>其他</td>
                                                    <td>9</td>
                                                    <td>7%</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                
                                <!-- 常用药品排行 -->
                                <div class="grid-col">
                                    <h3 style="margin-bottom: var(--spacing-16); font-size: var(--font-card-title); color: var(--text-secondary);">常用药品排行</h3>
                                    <div class="table-container">
                                        <table class="data-table">
                                            <thead>
                                                <tr>
                                                    <th>序号</th>
                                                    <th>药品名称</th>
                                                    <th>使用次数</th>
                                                    <th>金额</th>
                                                </tr>
                                            </thead>
                                            <tbody>
                                                <tr>
                                                    <td>1</td>
                                                    <td>氨氯地平片</td>
                                                    <td>42</td>
                                                    <td>¥1260</td>
                                                </tr>
                                                <tr>
                                                    <td>2</td>
                                                    <td>二甲双胍</td>
                                                    <td>38</td>
                                                    <td>¥950</td>
                                                </tr>
                                                <tr>
                                                    <td>3</td>
                                                    <td>阿司匹林</td>
                                                    <td>35</td>
                                                    <td>¥525</td>
                                                </tr>
                                                <tr>
                                                    <td>4</td>
                                                    <td>布洛芬</td>
                                                    <td>30</td>
                                                    <td>¥450</td>
                                                </tr>
                                                <tr>
                                                    <td>5</td>
                                                    <td>硝苯地平</td>
                                                    <td>28</td>
                                                    <td>¥840</td>
                                                </tr>
                                                <tr>
                                                    <td>6</td>
                                                    <td>甲钴胺</td>
                                                    <td>25</td>
                                                    <td>¥625</td>
                                                </tr>
                                                <tr>
                                                    <td>7</td>
                                                    <td>维生素B</td>
                                                    <td>22</td>
                                                    <td>¥330</td>
                                                </tr>
                                                <tr>
                                                    <td>8</td>
                                                    <td>奥美拉唑</td>
                                                    <td>20</td>
                                                    <td>¥400</td>
                                                </tr>
                                                <tr>
                                                    <td>9</td>
                                                    <td>头孢克洛</td>
                                                    <td>18</td>
                                                    <td>¥720</td>
                                                </tr>
                                                <tr>
                                                    <td>10</td>
                                                    <td>复方感冒药</td>
                                                    <td>15</td>
                                                    <td>¥225</td>
                                                </tr>
                                                <tr>
                                                    <td>-</td>
                                                    <td>其他</td>
                                                    <td>65</td>
                                                    <td>¥1950</td>
                                                </tr>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
                
                <!-- 用药合理性指标区域 -->
                <section style="padding: 0 var(--spacing-24) var(--spacing-24);">
                    <div class="card">
                        <div class="card-header">
                            <h2 class="card-title">用药合理性指标</h2>
                        </div>
                        <div class="card-body">
                            <div class="progress-container">
                                <div class="progress-label">
                                    <div class="progress-title">基本药物使用率</div>
                                    <div class="progress-value">78% (目标: 70%)</div>
                                </div>
                                <div class="progress-bar-bg">
                                    <div class="progress-bar success" style="width: 78%"></div>
                                </div>
                            </div>
                            
                            <div class="progress-container">
                                <div class="progress-label">
                                    <div class="progress-title">抗生素使用率</div>
                                    <div class="progress-value">15% (目标: &lt;20%)</div>
                                </div>
                                <div class="progress-bar-bg">
                                    <div class="progress-bar success" style="width: 15%"></div>
                                </div>
                            </div>
                            
                            <div class="progress-container">
                                <div class="progress-label">
                                    <div class="progress-title">注射剂使用率</div>
                                    <div class="progress-value">12% (目标: &lt;15%)</div>
                                </div>
                                <div class="progress-bar-bg">
                                    <div class="progress-bar success" style="width: 12%"></div>
                                </div>
                            </div>
                        </div>
                    </div>
                </section>
            </div>
        </div>
    </div>

    <!-- JavaScript 交互逻辑 -->
    <script>
        // 创建Vue应用
        document.addEventListener('DOMContentLoaded', function() {
            const { createApp, ref } = Vue;
            
            // 创建导航菜单Vue应用
            const navApp = createApp({
                setup() {
                    const activeIndex = ref('4-1'); // 默认选中"诊断统计"
                    
                    const handleSelect = (key, keyPath) => {
                        console.log(key, keyPath);
                        // 这里可以添加导航逻辑，如页面跳转等
                    };
                    
                    return {
                        activeIndex,
                        handleSelect
                    };
                }
            });
            
            // 使用Element Plus
            navApp.use(ElementPlus, {
                locale: ElementPlusLocaleZhCn
            });
            
            // 挂载Vue应用
            navApp.mount('#app-nav');

            // 用户下拉菜单
            const userSection = document.getElementById('userSection');
            const userDropdown = document.getElementById('userDropdown');
            
            if (userSection && userDropdown) {
                userSection.addEventListener('click', function(e) {
                    e.stopPropagation();
                    const isOpen = userDropdown.style.display === 'block';
                    userDropdown.style.display = isOpen ? 'none' : 'block';
                });

                document.addEventListener('click', function() {
                    userDropdown.style.display = 'none';
                });
            }

            // 初始化接诊趋势图
            const trendChartCtx = document.getElementById('trendChart').getContext('2d');
            const trendChart = new Chart(trendChartCtx, {
                type: 'line',
                data: {
                    labels: ['9月1日', '9月5日', '9月10日', '9月15日', '9月20日', '9月25日', '9月30日'],
                    datasets: [{
                        label: '接诊人次',
                        data: [4, 6, 5, 8, 7, 6, 5],
                        borderColor: '#0F6CBD',
                        backgroundColor: 'rgba(15, 108, 189, 0.1)',
                        borderWidth: 2,
                        pointBackgroundColor: '#0F6CBD',
                        tension: 0.3,
                        fill: true
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            display: false
                        },
                        tooltip: {
                            mode: 'index',
                            intersect: false,
                            backgroundColor: 'rgba(255, 255, 255, 0.9)',
                            titleColor: '#1A1A1A',
                            bodyColor: '#4D4D4D',
                            borderColor: '#E0E0E0',
                            borderWidth: 1,
                            padding: 12,
                            cornerRadius: 4,
                            boxShadow: '0 2px 6px rgba(0, 0, 0, 0.1)',
                            callbacks: {
                                label: function(context) {
                                    return `接诊人次: ${context.raw}`;
                                }
                            }
                        }
                    },
                    scales: {
                        x: {
                            grid: {
                                display: false
                            },
                            ticks: {
                                color: '#767676'
                            }
                        },
                        y: {
                            beginAtZero: true,
                            grid: {
                                color: '#F0F0F0'
                            },
                            ticks: {
                                color: '#767676',
                                precision: 0
                            }
                        }
                    }
                }
            });

            // 日期筛选功能
            const startDateInput = document.getElementById('startDate');
            const endDateInput = document.getElementById('endDate');
            const filterBtn = document.getElementById('filterBtn');

            filterBtn.addEventListener('click', function() {
                const startDate = startDateInput.value;
                const endDate = endDateInput.value;
                
                // 这里可以添加实际的数据筛选逻辑
                console.log(`筛选时间范围: ${startDate} 至 ${endDate}`);
                
                // 模拟数据更新
                alert(`已更新数据，显示 ${startDate} 至 ${endDate} 的统计结果`);
            });
        });
    </script>
</body>
</html>
